package com.cx.service.Impl;

import com.cx.dao.goodsDao;
import com.cx.domain.goods;
import com.cx.domain.goodsview;
import com.cx.service.goodsservice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class goodsserviceimpl implements goodsservice {
    @Autowired
    private goodsDao goodsDao;

    @Override
    public String selectid() {
        return goodsDao.selectid();
    }

    @Override
    public List<goodsview> selectall() {
        return goodsDao.selectall();
    }

    @Override
    public void insertgoods(String name, String type, String price) {
        goodsDao.insertgoods(name,type,price);
    }

    @Override
    public void deletegoods(String id) {
         goodsDao.delete(id);
    }

    @Override
    public void updategoods(String id, String name, String type, String price) {
        goodsDao.update(name,type,price,id);
    }

}
